/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ModelLayer;
import java.util.ArrayList;
/**
 *
 * @author Martin
 */
public class ProductDescription {
    private int proDescId;
    private String name;
    private double purchasePrice;
    private double salesPrice;
    private String description;
    private String location;
    private int minStock;
    private int maxStock;
    private int restockAmount;
    private boolean favorite;
    private String productType;
    private Supplier supplier;
    private ArrayList<Product> products;

    public ProductDescription(int proDescId, String name, double purchasePrice, double salesPrice, String description, String location, int minStock, int maxStock, int restockAmount, boolean favorite, Supplier supplier) {
        this.proDescId = proDescId;
        this.name = name;
        this.purchasePrice = purchasePrice;
        this.salesPrice = salesPrice;
        this.description = description;
        this.location = location;
        this.minStock = minStock;
        this.maxStock = maxStock;
        this.restockAmount = restockAmount;
        this.favorite = favorite;
        this.supplier = supplier;
        products = new ArrayList<Product>();
    }
    
    public ProductDescription()
    {
        products = new ArrayList<Product>();
    }
    
    public ProductDescription(int proDescId, String name, double purchasePrice, double salesPrice, String description, boolean favorite)
    {
        this.proDescId = proDescId;
        this.name = name;
        this.purchasePrice = purchasePrice;
        this.salesPrice = salesPrice;
        this.description = description;
        this.favorite = favorite;
    }
    
    public ProductDescription(int proDescId)
    {
        this.proDescId = proDescId;
        products = new ArrayList<Product>();
    }

    /**
     * @return the productId
     */
    public int getProDescId() {
        return proDescId;
    }

    /**
     * @param productId the productId to set
     */
    public void setProDescId(int proDescId) {
        this.proDescId = proDescId;
    }
    
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the purchasePrice
     */
    public double getPurchasePrice() {
        return purchasePrice;
    }

    /**
     * @param purchasePrice the purchasePrice to set
     */
    public void setPurchasePrice(double purchasePrice) {
        this.purchasePrice = purchasePrice;
    }

    /**
     * @return the salesPrice
     */
    public double getSalesPrice() {
        return salesPrice;
    }

    /**
     * @param salesPrice the salesPrice to set
     */
    public void setSalesPrice(double salesPrice) {
        this.salesPrice = salesPrice;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @return the location
     */
    public String getLocation() {
        return location;
    }

    /**
     * @param location the location to set
     */
    public void setLocation(String location) {
        this.location = location;
    }

    /**
     * @return the minStock
     */
    public int getMinStock() {
        return minStock;
    }

    /**
     * @param minStock the minStock to set
     */
    public void setMinStock(int minStock) {
        this.minStock = minStock;
    }

    /**
     * @return the maxStock
     */
    public int getMaxStock() {
        return maxStock;
    }

    /**
     * @param maxStock the maxStock to set
     */
    public void setMaxStock(int maxStock) {
        this.maxStock = maxStock;
    }

    /**
     * @return the restockAmount
     */
    public int getRestockAmount() {
        return restockAmount;
    }

    /**
     * @param restockAmount the restockAmount to set
     */
    public void setRestockAmount(int restockAmount) {
        this.restockAmount = restockAmount;
    }

    /**
     * @return the favorite
     */
    public boolean isFavorite() {
        return favorite;
    }

    /**
     * @param favorite the favorite to set
     */
    public void setFavorite(boolean favorite) {
        this.favorite = favorite;
    }

    /**
     * @return the supplier
     */
    public Supplier getSupplier() {
        return supplier;
    }

    /**
     * @param supplier the supplier to set
     */
    public void setSupplier(Supplier supplier) {
        this.supplier = supplier;
    }
    
    /**
     * @return the products
     */
    public Product getProducts(int index) {
        return products.get(index);
    }

    /**
     * @param products the products to set
     */
    public void setProducts(Product product) {
        products.add(product);
    }
    
    public void setProductArray(ArrayList<Product> products)
    {
        this.products = products;
    }

    /**
     * @return the productType
     */
    public String getProductType() {
        return productType;
    }

    /**
     * @param productType the productType to set
     */
    public void setProductType(String productType) {
        this.productType = productType;
    }
}
